home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
476-500
/
disk_500
/
wiconify
/
wiconify-source.lzh
/
Source
/
wStubs.a
< prev
next >
Wrap
Text File
|
1991-04-19
|
9KB
|
204 lines
CSECT text
XREF _cOpenWindow
XREF _OldOpenWindow
XREF _cCloseWindow
XREF _OldCloseWindow
XREF _cOpenScreen
XREF _OldOpenScreen
XREF _cCloseScreen
XREF _OldCloseScreen
XREF _cSetWindowTitles
XREF _OldSetWindowTitles
XREF _cWindowToFront
XREF _OldWindowToFront
XREF _cWindowToBack
XREF _OldWindowToBack
XREF _cActivateWindow
XREF _OldActivateWindow
XREF _cBuildSysRequest
XREF _OldBuildSysRequest
XREF _cFreeSysRequest
XREF _OldFreeSysRequest
XREF _cAutoRequest
XREF _OldAutoRequest
XREF _wHandler
XDEF _wHandlerStub
XDEF _aOpenWindow
XDEF _aOldOpenWindow
XDEF _aCloseWindow
XDEF _aOldCloseWindow
XDEF _aOpenScreen
XDEF _aCloseScreen
XDEF _aOldCloseScreen
XDEF _aSetWindowTitles
XDEF _aWindowToFront
XDEF _aWindowToBack
XDEF _aActivateWindow
XDEF _aBuildSysRequest
XDEF _aOldBuildSysRequest
XDEF _aFreeSysRequest
XDEF _aOldFreeSysRequest
XDEF _aAutoRequest
_wHandlerStub:
MOVEM.L A0/A1,-(SP)
JSR _wHandler
ADDQ.L #8,SP
RTS
_aOpenWindow:
MOVEM.L D2-D7/A0-A6,-(SP) ; save registers on stack
MOVE.L A0,-(SP) ; push NewWindow pointer
JSR _cOpenWindow ; call our C OpenWindow
ADDQ.L #4,SP ; pop the pointer
MOVEM.L (SP)+,D2-D7/A0-A6 ; restore registers
RTS
_aOldOpenWindow:
MOVE.L 4(SP),A0 ; move NewWindow pointer to register
MOVE.L _OldOpenWindow,A1 ; move old address to A1
JMP (A1) ; JMP to old OpenWindow routine
_aCloseWindow:
MOVEM.L D0-D7/A0-A6,-(SP) ; save registers on stack
MOVE.L A0,-(SP) ; push the Window pointer
JSR _cCloseWindow ; call our C CloseWindow
ADDQ.L #4,SP ; pop the pointer
MOVEM.L (SP)+,D0-D7/A0-A6 ; restore registers
RTS
_aOldCloseWindow:
MOVE.L 4(SP),A0 ; move Window pointer to register
MOVE.L _OldCloseWindow,A1 ; move old address to A1
JMP (A1) ; JMP to old CloseWindow routine
_aOpenScreen:
MOVE.L _OldOpenScreen,A1 ; move old address to A1
JSR (A1) ; JMP to old OpenScreen routine
MOVEM.L D0-D7/A0-A6,-(SP) ; save registers on stack
MOVE.L D0,-(SP) ; push the new Screen pointer
JSR _cOpenScreen ; call our C OpenScreen
ADDQ.L #4,SP ; pop the pointer
MOVEM.L (SP)+,D0-D7/A0-A6 ; restore registers
RTS
_aCloseScreen:
MOVEM.L D0-D7/A0-A6,-(SP) ; save registers on stack
MOVE.L A0,-(SP) ; push the Screen pointer
JSR _cCloseScreen ; call our C CloseScreen
ADDQ.L #4,SP ; pop the pointer
MOVEM.L (SP)+,D0-D7/A0-A6 ; restore registers
RTS
_aOldCloseScreen:
MOVE.L 4(SP),A0 ; move Screen pointer to register
MOVE.L _OldCloseScreen,A1 ; move old address to A1
JMP (A1) ; JMP to old CloseScreen routine
_aSetWindowTitles:
MOVEM.L D2-D7/A0-A6,-(SP) ; save registers on stack
MOVE.L A2,-(SP) ; push Screen Title pointer
MOVE.L A1,-(SP) ; push Window Title pointer
MOVE.L A0,-(SP) ; push Window pointer
MOVE.L _OldSetWindowTitles,A3 ; move old address to A3
JSR (A3) ; JMP to old SetWindwoTitles routine
JSR _cSetWindowTitles ; call our C SetWindowTitles
ADD.L #12,SP ; pop the pointers
MOVEM.L (SP)+,D2-D7/A0-A6 ; restore registers
RTS
_aWindowToFront:
MOVEM.L D2-D7/A0-A6,-(SP) ; save registers on stack
MOVE.L A0,-(SP) ; push the Window pointer
JSR _cWindowToFront ; call our C WindowToFront
ADDQ.L #4,SP ; pop the pointer
MOVEM.L (SP)+,D2-D7/A0-A6 ; restore registers
TST.L D0 ; check if OK to move window
BEQ W2Frts ; skip WindowToFront if not
MOVE.L _OldWindowToFront,A1 ; move old address to A1
JSR (A1) ; JMP to old WindowToFront routine
W2Frts: RTS
_aWindowToBack:
MOVEM.L D2-D7/A0-A6,-(SP) ; save registers on stack
MOVE.L A0,-(SP) ; push the Window pointer
JSR _cWindowToBack ; call our C WindowToBack
ADDQ.L #4,SP ; pop the pointer
MOVEM.L (SP)+,D2-D7/A0-A6 ; restore registers
TST.L D0 ; check if OK to move window
BEQ W2Brts ; skip WindowToBack if not
MOVE.L _OldWindowToBack,A1 ; move old address to A1
JSR (A1) ; JMP to old WindowToBack routine
W2Brts: RTS
_aActivateWindow:
MOVEM.L D2-D7/A0-A6,-(SP) ; save registers on stack
MOVE.L A0,-(SP) ; push the Window pointer
JSR _cActivateWindow ; call our C ActivateWindow
ADDQ.L #4,SP ; pop the pointer
MOVEM.L (SP)+,D2-D7/A0-A6 ; restore registers
TST.L D0 ; check if OK to activate
BEQ AWrts ; skip activation if not
MOVE.L _OldActivateWindow,A1 ; move old address to A1
JSR (A1) ; JMP to old ActivateWindow routine
AWrts: RTS
_aBuildSysRequest:
MOVEM.L D2-D7/A0-A6,-(SP) ; save registers on stack
MOVE.L D2,-(SP) ; push the Height
MOVE.L D1,-(SP) ; push the Width
MOVE.L D0,-(SP) ; push the IDCMP Flags
MOVE.L A3,-(SP) ; push the Negative Text
MOVE.L A2,-(SP) ; push the Positive Text
MOVE.L A1,-(SP) ; push the Body Text
MOVE.L A0,-(SP) ; push Window pointer
JSR _cBuildSysRequest ; call our C BuildSysRequest
ADD.L #28,SP ; pop the pointers
MOVEM.L (SP)+,D2-D7/A0-A6 ; restore registers
RTS
_aOldBuildSysRequest:
MOVE.L 28(SP),D2 ; move Height to register
MOVE.L 24(SP),D1 ; move Width to register
MOVE.L 20(SP),D0 ; move IDCMP flags to register
MOVE.L 16(SP),A3 ; move Negative Text to register
MOVE.L 12(SP),A2 ; move Positive Text to register
MOVE.L 8(SP),A1 ; move Body Text to register
MOVE.L 4(SP),A0 ; move Window pointer to register
MOVE.L _OldBuildSysRequest,A4 ; move old address to A4
JMP (A4) ; JMP to old BuildSysRequest routine
_aFreeSysRequest:
MOVEM.L D0-D7/A0-A6,-(SP) ; save registers on stack
MOVE.L A0,-(SP) ; push the Window pointer
JSR _cFreeSysRequest ; call our C FreeSysRequest
ADDQ.L #4,SP ; pop the pointer
MOVEM.L (SP)+,D0-D7/A0-A6 ; restore registers
RTS
_aOldFreeSysRequest:
MOVE.L 4(SP),A0 ; move Window pointer to register
MOVE.L _OldFreeSysRequest,A1 ; move old address to A1
JMP (A1) ; JMP to old FreeSysRequest routine
_aAutoRequest:
MOVEM.L D2-D7/A0-A6,-(SP) ; save registers on stack
MOVE.L D3,-(SP) ; push the Height
MOVE.L D2,-(SP) ; push the Width
MOVE.L D1,-(SP) ; push the Negative IDCMP Flags
MOVE.L D0,-(SP) ; push the Positive IDCMP Flags
MOVE.L A3,-(SP) ; push the Negative Text
MOVE.L A2,-(SP) ; push the Positive Text
MOVE.L A1,-(SP) ; push the Body Text
MOVE.L A0,-(SP) ; push Window pointer
JSR _cAutoRequest ; call our C AutoRequest
ADD.L #32,SP ; pop the pointers
MOVEM.L (SP)+,D2-D7/A0-A6 ; restore registers
RTS
END